<?php 

if (!defined('BASEPATH'))
exit('No direct script access allowed');
	
	if(!defined('getCountry'))
	{
		 function getCountry()
		{
			$CI = & get_instance();
			$CI->load->model('mod_book');
			$data['get_data'] = $CI->mod_book->getCountry();
			return $data['get_data'];
		}
	}
    if(!defined('getShippingDetailUs'))
    {
         function getShippingDetailUs($userId)
        {
            $CI = & get_instance();
            $CI->load->model('mod_book');
            $data['get_data'] = $CI->mod_book->getAllShippingAddress($userId);
            return $data['get_data'];
        }
    }

    if(!defined('getShippingPrice'))
    {
         function getShippingPrice()
        {
            $CI = & get_instance();
            $CI->load->model('mod_book');
            $data['get_data'] = $CI->mod_book->getShippingPrice();
            return $data['get_data'];
        }
    }

	if (!function_exists('pagination')) {

    function pagination($limit, $segment, $base_url, $total_rows, $num_links) {
        $CI = & get_instance();

        $config['uri_segment'] = $segment;
        $config['base_url'] = $base_url;
        $config['total_rows'] = $total_rows;
        $config['per_page'] = $limit;
        $config['num_links'] = $num_links;
        //Style pagination
        $config['full_tag_open'] = '<ul class="pagination">';
        $config['full_tag_close'] = '</ul>';
        $config['prev_link'] = '&lt; Prev';
        $config['prev_tag_open'] = '<li class="paginate_button previous">';
        $config['prev_tag_close'] = '</li>';
        $config['next_link'] = 'Next &gt;';
        $config['next_tag_open'] = '<li class="paginate_button next" >';
        $config['next_tag_close'] = '</li>';
        $config['cur_tag_open'] = '<li class="paginate_button active"><a href="#">';
        $config['cur_tag_close'] = '</a></li>';
        $config['num_tag_open'] = '<li  class="paginate_button" >';
        $config['num_tag_close'] = '</li>';
        $config['first_link'] = FALSE;
        $config['last_link'] = FALSE;
        return $CI->pagination->initialize($config);
    }

}

	
	
?>